"""
标识符
命名规则 字母下划线数字组成 数字不开头
"""
"""
标识符
"""
import keyword as kw

print(kw.kwlist)

# ['False', 'None', 'True', '__peg_parser__', 'and', 'as', 'assert', 'async', 'await', 'break', 'class', 'continue',
# 'def', 'del', 'elif', 'else', 'except', 'finally', 'for', 'from', 'global', 'if', 'import', 'in', 'is', 'lambda',
# 'nonlocal', 'not', 'or', 'pass', 'raise', 'return', 'try', 'while', 'with', 'yield']

"""变量"""

name = 'jing'
print(name)

a = 13
b = 12
c = a + b
print(c)  # 25
c = 0
print(c)  # 0

"""
字符串
是一个序列 使用单、双、三引号包裹有序的集合
"""
str1 = 'python'
str2 = "python"
str3 = """python"""
print(f"{str1} {str2} {str3}")
# python python python

"""
三板斧
print() type() dir()
"""
print(type(a))
# <class 'int'>
print(type(str1))
# <class 'str'>

# print(dir(str1))
# ['__add__', '__class__', '__contains__', '__delattr__', '__dir__', '__doc__', '__eq__',
# '__format__', '__ge__', '__getattribute__', '__getitem__', '__getnewargs__', '__gt__',
# '__hash__', '__init__', '__init_subclass__', '__iter__', '__le__', '__len__', '__lt__',
# '__mod__', '__mul__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__',
# '__rmod__', '__rmul__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__',
# 'capitalize', 'casefold', 'center', 'count', 'encode', 'endswith', 'expandtabs', 'find',
# 'format', 'format_map', 'index', 'isalnum', 'isalpha', 'isascii', 'isdecimal', 'isdigit',
# 'isidentifier', 'islower', 'isnumeric', 'isprintable', 'isspace', 'istitle', 'isupper',
# 'join', 'ljust', 'lower', 'lstrip', 'maketrans', 'partition', 'removeprefix', 'removesuffix',
# 'replace', 'rfind', 'rindex', 'rjust', 'rpartition', 'rsplit', 'rstrip', 'split', 'splitlines',
# 'startswith', 'strip', 'swapcase', 'title', 'translate', 'upper', 'zfill']

"""修改字符串"""
print(str1.upper())
# PYTHON 大写
print(str1.lower())
# python 小写

"""找到下标"""
print(str1.find("h"))
# 3 下标三 第四个位置
"""剔除空格"""
s = 'abca aaa'
print(s.replace(" ", ""))
# abcaaaa

"""数字"""

num1 = 3.14e-5
print(num1)
# 3.14e-05 即 0.0000314

# 复数
num2 = 1 + 2j

# print(dir(num2))

print(type(num2))
# <class 'complex'>

# 转换

"""运算符"""
# 赋值 计算 成员
